package cn.tedu.csmall.product.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@Accessors(chain = true)
public class AttributeTemplateAddNewParam implements Serializable {

    @NotNull(message = "添加属性模板失败，必须提交属性模板名称！")
    @ApiModelProperty(value = "属性模板名称", required = true, example = "华为mate70")
    private String name;

    @NotNull(message = "添加属性模板失败，必须提交属性模板拼音！")
    @ApiModelProperty(value = "属性模板的拼音", required = true, example = "HUAWEImate70")
    private String pinyin;

    @ApiModelProperty(value = "关键词", required = false, example = "mate70,华为mate70")
    private String keywords;

    @NotNull(message = "添加属性模板失败，必须提交属性模板排序序号！")
    @ApiModelProperty(value = "排序序号,必须是1~99之间的数字", required = true, example = "23")
    @Range(min = 1, message = "添加属性模板失败，排序序号值必须在1-99之间")
    private Integer sort;
}
